﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace ConsoleRestHost
{
	class Program
	{
		static void Main(string[] args)
		{
			ServiceHost host = new ServiceHost(typeof(WcfRestLib.RestService));

			host.Open();

			Console.WriteLine("Service start hosted at http://localhost:2222/RestService");

			Console.ReadLine();

			if (host != null && host.State == CommunicationState.Opened)
				host.Close();

			Console.WriteLine("Service end hosted at http://localhost:2222/RestService");

			System.Threading.Thread.Sleep(1500);
		}
	}
}
